import React from 'react'
import { useDispatch } from 'react-redux'
import { show } from '@/store/toastSlice'
import FuncTaost from '@/components/FuncToast';

export default function Fast() {
  const dispatch = useDispatch();
  const clickHandle = () => {
    // 点击的时候调用全局 toast 显示出来
    // dispatch(show({ message: "hello", type: "success" }))
    FuncTaost("登录成功");
  }

  return (
    <div>
      <h3>Fast</h3>
      <p>
        <button onClick={clickHandle}>提示</button>
      </p>
    </div>
  )
}
